package com.shtel.bss.saas.tenant.entity;

import java.util.Date;
import com.shtel.bss.saas.core.data.common.entiry.IAbsBaseEntity;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import com.shtel.bss.saas.core.base.spring.ApplicationContextUtil;
import com.shtel.bss.saas.tenant.entity.repository.ISysGlobalAreaRepository;

/**
 * 区域表
 * @author xiezhiwei 2020-02-05 21:09
 */
@Table(name = "SYS_GLOBAL_AREA")
public class SysGlobalArea extends IAbsBaseEntity<Long> {
	
    /**
     * 区域编号
     * 
     */
	@Column(name = "AREA_CODE")
	private String areaCode;
    /**
     * 区域ID
     * 
     */
	@Id
	@Column(name = "AREA_ID")
	private Long areaId;
    /**
     * 区域名称
     * 
     */
	@Column(name = "AREA_NAME")
	private String areaName;
    /**
     * 排序
     * 
     */
	@Column(name = "AREA_SORT")
	private Long areaSort;
    /**
     * 地区类型（1：省，2：市，3：区县，4：街道）
     * 
     */
	@Column(name = "AREA_TYPE")
	private byte areaType;
    /**
     * 创建时间
     * 
     */
	@Column(name = "CREATE_TIME")
	private Date createTime;
    /**
     * 创建人
     * 
     */
	@Column(name = "CREATE_USER_ID")
	private Long createUserId;
    /**
     * 删除标识(1已删除 0未删除)
     * 
     */
	@Column(name = "IS_DELETE")
	private byte isDelete;
    /**
     * 是否不可修改(1:不可修改;0:可修改)
     * 
     */
	@Column(name = "IS_FINAL")
	private byte isFinal;
    /**
     * 修改时间
     * 
     */
	@Column(name = "MODIFY_TIME")
	private Date modifyTime;
    /**
     * 修改人
     * 
     */
	@Column(name = "MODIFY_USER_ID")
	private Long modifyUserId;
    /**
     * 父ID
     * 
     */
	@Column(name = "PARENT_ID")
	private Long parentId;

	public static ISysGlobalAreaRepository repository() {
		return (ISysGlobalAreaRepository) ApplicationContextUtil.getBean("sysGlobalAreaRepository");
	}
	
    public void setAreaCode(String areaCode) {
    	this.areaCode = areaCode;
    }
    
    public String getAreaCode() {
	   return areaCode;
    }
    
    public void setAreaId(Long areaId) {
    	this.areaId = areaId;
    }
    
    public Long getAreaId() {
	   return areaId;
    }
    
    public void setAreaName(String areaName) {
    	this.areaName = areaName;
    }
    
    public String getAreaName() {
	   return areaName;
    }
    
    public void setAreaSort(Long areaSort) {
    	this.areaSort = areaSort;
    }
    
    public Long getAreaSort() {
	   return areaSort;
    }
    
    public void setAreaType(byte areaType) {
    	this.areaType = areaType;
    }
    
    public byte getAreaType() {
	   return areaType;
    }
    
    public void setCreateTime(Date createTime) {
    	this.createTime = createTime;
    }
    
    public Date getCreateTime() {
	   return createTime;
    }
    
    public void setCreateUserId(Long createUserId) {
    	this.createUserId = createUserId;
    }
    
    public Long getCreateUserId() {
	   return createUserId;
    }
    
    public void setIsDelete(byte isDelete) {
    	this.isDelete = isDelete;
    }
    
    public byte getIsDelete() {
	   return isDelete;
    }
    
    public void setIsFinal(byte isFinal) {
    	this.isFinal = isFinal;
    }
    
    public byte getIsFinal() {
	   return isFinal;
    }
    
    public void setModifyTime(Date modifyTime) {
    	this.modifyTime = modifyTime;
    }
    
    public Date getModifyTime() {
	   return modifyTime;
    }
    
    public void setModifyUserId(Long modifyUserId) {
    	this.modifyUserId = modifyUserId;
    }
    
    public Long getModifyUserId() {
	   return modifyUserId;
    }
    
    public void setParentId(Long parentId) {
    	this.parentId = parentId;
    }
    
    public Long getParentId() {
	   return parentId;
    }
    
	@Override
	public Long getId() {
		return getAreaId();
	}

	@Override
	public void setId(Long id) {
		setAreaId(id);
	}
}